package com.example.switch_text.utils;

/**
 * 响应码枚举，参考HTTP状态码的语义
 */
public enum ResultCode {
    SUCCESS("200"),//成功
    FAIL("400"),//平台服务异常
    DATABASE_EXCEPTION("E1002"), //服务器数据库异常
    PARAM_EXCEPTION_LACK_REQUIRED("E2001"),//请求参数异常，缺少必填项
    PARAM_EXCEPTION_LLLEGAL_FORMAT("E2002");//请求参数异常，参数格式不合法

    private final String responseCode;

    ResultCode(String responseCode) {
        this.responseCode = responseCode;
    }

    public String responseCode() {
        return responseCode;
    }
}
